<html>
<head>
<TITLE>Marsems System</TITLE>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<LINK href="../css/style.css" type=text/css rel=stylesheet>
</head>
{literal}
<script language="javascript" src="../js/Validation.js" type="text/JavaScript"></script>
<SCRIPT language=JavaScript>
var valid = new Validation();
function checkForm(){
	var theform = window.document.form1
	
	if (valid.isEmpty("name"," name")){
		return false;
	}else{
		return true;
	}
}
</script>
{/literal}
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="" enctype="multipart/form-data">
  <table width="100%" cellspacing="0" cellpadding="2">
    <tr bgcolor="#E4E4E4"> 
      <td width="15%">&nbsp;Add Product</td>
      <td width="70%"><font color="#FF0000">&nbsp;{$error_message}</font></td>
      <td  width="10%" align="right">&nbsp;
      		{if $productID > 0}
      			<A href="listProduct_Images.php?menuGid={$menuGid}&menuid={$menuid}&id={$productID}" target="_self">Upload Images</A>&nbsp;&nbsp;
      		{/if}
      </td>
 
      <td width="10%" align="right">&nbsp;<A href="{$backurl}" target="_self">Back</A>&nbsp;&nbsp;</td>
    </tr>
    <tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
      <td height="30" align="right">Name:</td>
      <td colspan="3"> 
        &nbsp;&nbsp;
        <input name="name" type="text" id="name" value="{$name}" size="80" maxlength="120">
      &nbsp; <font color="#FF0000"> *</font> </td>
    </tr>
    <tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
      <td align="right">Category:</td>
      <td colspan="3">&nbsp;
      <label><select name="categoryID" id="categoryID">{html_options options=$arrCategories selected=$categoryID}</select></label>
        <font color="#FF0000"> *</font> </td>
    </tr>
    <tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
      <td height="30" align="right">Price($):</td>
      <td colspan="3"> 
        &nbsp;&nbsp;
        <input name="price" type="text" id="price" value="{$price}" size="60" maxlength="80"></td>
    </tr>
       <tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
      <td align="right">Manufacturers:</td>
      <td colspan="3">
      &nbsp;&nbsp;<select name="manufacturerID" id="manufacturerID">{html_options options=$arrManufacturer selected=$manufacturerIDS}</select>
	  <font color="#FF0000">*</font></td>
    </tr>
    
       <tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
      <td align="right">Shipping Type:</td>
      <td colspan="3">
      &nbsp;&nbsp;<select name="shippingTypeID">{html_options options=$arrShippingType selected=$shippingTypeID}</select>
	  <font color="#FF0000">*</font></td>
    </tr>
	<tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
      <td align="right">Tax Rate:</td>
      <td colspan="3">
      &nbsp;&nbsp;<select name="taxRateID" id="taxRateID">{html_options options=$arrTax selected=$taxRateIDS}</select>
	  <font color="#FF0000">*</font></td>
    </tr>
 
 <tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
      <td height="30" align="right">Weight:</td>
      <td colspan="3"> 
        &nbsp;&nbsp;
        <input name="weight" type="text" id="weight" value="{$weight}" size="60" maxlength="80"></td>
    </tr>
    <tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
      <td height="30" align="right">Quantity:</td>
      <td colspan="3"> 
        &nbsp;&nbsp;
        <input name="totalCount" type="text" id="totalCount" value="{$totalCount}" size="60" maxlength="80"></td>
    </tr>
    <tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
      <td height="30" align="right">Model:</td>
      <td colspan="3"> 
        &nbsp;&nbsp;
        <input name="model" type="text" id="model" value="{$model}" size="60" maxlength="80"></td>
    </tr>
    <tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
      <td height="30" align="right">UPC:</td>
      <td colspan="3"> 
        &nbsp;&nbsp;
        <input name="UPC" type="text" id="UPC" value="{$UPC}" size="60" maxlength="80"></td>
    </tr>
	<tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
      <td height="30" align="right">URL:</td>
      <td colspan="3"> 
        &nbsp;&nbsp;
        <input name="url" type="text" id="url" value="{$url}" size="60" maxlength="80"></td>
    </tr>


    <tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
      <td height="30" align="right">Description:</td>
      <td colspan="3"> 
        &nbsp;&nbsp;
        {$fckHtml}
       </td>
    </tr>
      {foreach item = data from = $arrAttributes}
    <tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
      <td height="30" align="right">{$data.name}:</td>
      	<td colspan="3">
      		<table width="100%" cellspacing="0" cellpadding="2">
 		            {foreach name=att item=attribute from = $data.attribute}
			            {if $attribute.options|@count == 0}
		            		{if $smarty.foreach.att.first == 'true'}
		            			<tr>
		            			<td>
		            		{/if}
				        		<label><input type="checkbox" name="attributes[]" value="{$attribute.id}" {$attribute.checked} />{$attribute.name}</label>
					        {if $smarty.foreach.att.last == 'true'}
					        	</td>
					        {/if}
		            	{else}
				            <tr>
				            	<td width="25%">
					        		<label><input type="checkbox" name="attributes[]" value="{$attribute.id}" {$attribute.checked} />{$attribute.name}</label>
					        	</td>
					        	
					        	{foreach item=values from = $attribute.options}
						        	<td width="75%">
						        		{if $values.keyes == 'Price'}
						        			{$values.keyes}: <input name="attribute_price_{$attribute.id}" type="text" size="5" maxlength="10" value="{$values.valuess / 100}">
						        		{/if}
									</td>
								{/foreach}
							{if $smarty.foreach.att.last != 'true'}
					        	</tr>
					        {/if}
				         {/if}
			        {/foreach}
		       </tr>
		    </table>
		</td>
    </tr>
    
    {/foreach}
    <tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
      <td align="right">Status:</td>
      <td colspan="3">{html_radios name="status" options=$arrStatus checked=$StatusS separator=" "}
 	  <font color="#FF0000">*</font></td>
    </tr>

<!--      <tr>
		<td height="30" align="right"></td>
        <td colspan="3"><img src="../images/pixel_black.gif" border="0" alt="" width="100%" height="1"></td>
     </tr> -->
    <tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'">
      <td height="23"></td>
      <td height="23" colspan="3">
        &nbsp;&nbsp;
        <input type="submit" name="Submit" value="Submit" onClick="return checkForm()">
        <input type="reset" name="Reset" value="Reset">
        <input name="menuGid" type="hidden" id="menuGid" value="{$menuGid}">
      	<input name="menuid" type="hidden" id="menuid" value="{$menuid}">
      	<input name="productID" type="hidden" id="productID" value="{$productID}">
      	<input name="backurl" type="hidden" id="backurl" value="{$backurl}"></td>
    </tr>
  </table>
</form>
</body>
</html>